<?php
include("check.php");
/*include("check2.php");*/
include_once("../function.php");
include_once("../class/system_class.php");

if ($_GET['action']=="admin"){
	$ID=$_GET['ID'];
}else{
	$_system=new system_class();
	if ($_system->system_wlt()!=1){
		echo "<script language=javascript>alert('您没有查看网络结构的权限.');window.location.href='member.php'</script>";	
	}
	
	if ($_POST['submin']){
		if ($chaus=getMemberbyNickName($_POST['nickname'])){
			if(checkisppath($_SESSION['ID'],$chaus['id'])){
				$ID=$chaus['id'];
			}else{
				echo "<script language=javascript>alert('您的网络中不存在该成员.');window.location.href='?'</script>";		
			}
		}else{
			echo "<script language=javascript>alert('您的网络中不存在该成员.');window.location.href='?'</script>";	
		}
	}else{
		if ($_GET['ID'] == null){
			$ID=$_SESSION['ID'];
		}else if($_GET['ID'] == $_SESSION['ID']){ 
			$ID=$_SESSION['ID'];
		}else{
			if(checkisppath($_SESSION['ID'],$_GET['ID'])){
				$ID=$_GET['ID'];
			}else{
				echo "<script language=javascript>alert('您的网络中不存在该成员.');window.location.href='?'</script>";		
			}
		}	
	}
}



	$ispay="#00DB00";
	$nopay="#FFFF00";
	$nore="#A3CDF8";
	session_start();
	$session=getMemberbyID($_SESSION['ID']);
	$us=getMemberbyID($ID);
	$UserID=$us['userid'];
	$NickName=$us['nickname'];
	$UserName=$us['username'];
	$uLevel=$us['ulevel'];
	$narea1=$us['area1'];
	$narea2=$us['area2'];
	$narea3=$us['area3'];
	$yarea1=$us['yarea1'];
	$usname=$us['username'];
	$yarea2=$us['yarea2'];
	$yarea3=$us['yarea3'];
	$rname=$us['rname'];
	$ul=ulevel($uLevel);
    $jibie=$ul['lvname'];
//	$jibie=shengjiname($us['ulevel2']);
	if ($us['ispay']==0){
		$usispaycolor=$nopay;	
	}else{
		$usispaycolor=$ispay;		
	}

	//A区
	if ($p1=getFatherManbyFidAndTreeplace($ID,1)){
  /*      $cha=$p1['plevel']-$session['plevel'];
	    if($cha>1){
            $p1NickName="<font color=black>".$p1['nickname']."</font>";
        }else{*/
            $p1NickName="<a href='?ID=".$p1['id']."'>"."<font color=black>".$p1['nickname']."</font>"."</a>";
     //   }
		$ul=ulevel($p1['ulevel']);
		$p1jibie=$ul['lvname'];
     //   $p1jibie=shengjiname($p1['ulevel2']);
		$p1rname=$p1['rname'];
		$p1area1=$p1['area1'];
		$p1area2=$p1['area2'];
		$p1area3=$p1['area3'];
		$p1usname=$p1['username'];
		$p1ulevel=$p1['ulevel'];
		$p1yarea1=$p1['yarea1'];
		$p1yarea2=$p1['yarea2'];
		$p1yarea3=$p1['yarea3'];
		if ($p1['ispay']==0){
			$p1ispaycolor=$nopay;	
		}else{
			$p1ispaycolor=$ispay;		
		}
	}else{
		$p1NickName="<a href='register.php?nickname=".$NickName."&tid=1'><font color=black>注册</font></a>";
		$p1jibie="空位";
		$p1area1=0;
		$p1area2=0;
		$p1area3=0;
		$p1yarea1=0;
		$p1yarea2=0;
		$p1yarea3=0;
	}
	//AA区
	if ($p11=getFatherManbyFidAndTreeplace($p1['id'],1)){
		$p11NickName="<a href='?ID=".$p11['id']."'>"."<font color=black>".$p11['nickname']."</font>";
		$ul=ulevel($p11['ulevel']);
   //     $p11jibie=shengjiname($p11['ulevel2']);
		$p11jibie=$ul['lvname'];
		$p11rname=$p11['rname'];
		$p11area1=$p11['area1'];
		$p11area2=$p11['area2'];
		$p11area3=$p11['area3'];
		$p11usname=$p11['username'];
		$p11ulevel=$p11['ulevel'];
		$p11yarea1=$p11['yarea1'];
		$p11yarea2=$p11['yarea2'];
		$p11yarea3=$p11['yarea3'];
		if ($p11['ispay']==0){
			$p11ispaycolor=$nopay;	
		}else{
			$p11ispaycolor=$ispay;		
		}
	}else{
		if ($p1['id']==null){
			$p11NickName="注册";	
		}else{
			$p11NickName="<a href='register.php?nickname=".$p1['nickname']."&tid=1'><font color=black>注册</font></a>";	
		}	
		$p11jibie="空位";
		$p11area1=0;
		$p11area2=0;
		$p11area3=0;
		$p11yarea1=0;
		$p11yarea2=0;
		$p11yarea3=0;
	}
	//AB区
	if ($p12=getFatherManbyFidAndTreeplace($p1['id'],2)){
		$p12NickName="<a href='?ID=".$p12['id']."'>"."<font color=black>".$p12['nickname']."</font>";
		$ul=ulevel($p12['ulevel']);
    //    $p12jibie=shengjiname($p12['ulevel2']);
		$p12jibie=$ul['lvname'];
		$p12rname=$p12['rname'];
		$p12area1=$p12['area1'];
		$p12usname=$p12['username'];
		$p12ulevel=$p12['ulevel'];
		$p12area2=$p12['area2'];
		$p12area3=$p12['area3'];
		$p12yarea1=$p12['yarea1'];
		$p12yarea2=$p12['yarea2'];
		$p12yarea3=$p12['yarea3'];
		if ($p12['ispay']==0){
			$p12ispaycolor=$nopay;	
		}else{
			$p12ispaycolor=$ispay;		
		}
	}else{
		if ($p1['id']==null){
			$p12NickName="注册";	
		}else{
			$p12NickName="<a href='register.php?nickname=".$p1['nickname']."&tid=2'><font color=black>注册</font></a>";	
		}	
		$p12jibie="空位";
		$p12area1=0;
		$p12area2=0;
		$p12area3=0;
		$p12yarea1=0;
		$p12yarea2=0;
		$p12yarea3=0;
	}
//AC区
if ($p13=getFatherManbyFidAndTreeplace($p1['id'],3)){
	$p13NickName="<a href='?ID=".$p13['id']."'>"."<font color=black>".$p13['nickname']."</font>";
	$ul=ulevel($p13['ulevel']);
	$p13jibie=$ul['lvname'];
//    $p13jibie=shengjiname($p13['ulevel2']);
	$p13rname=$p13['rname'];
	$p13area1=$p13['area1'];
	$p13usname=$p13['username'];
	$p13ulevel=$p13['ulevel'];
	$p13area2=$p13['area2'];
	$p13area3=$p13['area3'];
	$p13yarea1=$p13['yarea1'];
	$p13yarea2=$p13['yarea2'];
	$p13yarea3=$p13['yarea3'];
	if ($p13['ispay']==0){
		$p13ispaycolor=$nopay;
	}else{
		$p13ispaycolor=$ispay;
	}
}else{
	if ($p1['id']==null){
		$p13NickName="注册";
	}else{
		$p13NickName="<a href='register.php?nickname=".$p1['nickname']."&tid=3'><font color=black>注册</font></a>";
	}
	$p13jibie="空位";
	$p13area1=0;
	$p13area2=0;
	$p13area3=0;
	$p13yarea1=0;
	$p13yarea2=0;
	$p13yarea3=0;
}
	//B区
	if ($p2=getFatherManbyFidAndTreeplace($ID,2)){
/*        $cha=$p2['plevel']-$session['plevel'];
    if($cha>1){
        $p2NickName="<font color=black>".$p2['nickname']."</font>";
    }else{*/
        $p2NickName="<a href='?ID=".$p2['id']."'>"."<font color=black>".$p2['nickname']."</font>"."</a>";
  //  }
		$ul=ulevel($p2['ulevel']);
		$p2jibie=$ul['lvname'];
    //    $p2jibie=shengjiname($p2['ulevel2']);
		$p2rname=$p2['rname'];
		$p2area1=$p2['area1'];
		$p2usname=$p2['username'];
		$p2ulevel=$p2['ulevel'];
		$p2area2=$p2['area2'];
		$p2area3=$p2['area3'];
		$p2yarea1=$p2['yarea1'];
		$p2yarea2=$p2['yarea2'];
		$p2yarea3=$p2['yarea3'];
		if ($p2['ispay']==0){
			$p2ispaycolor=$nopay;	
		}else{
			$p2ispaycolor=$ispay;		
		}
	}else{
		$p2NickName="<a href='register.php?nickname=".$NickName."&tid=2'><font color=black>注册</font></a>";
		$p2jibie="空位";
		$p2area1=0;
		$p2area2=0;
		$p2area3=0;
		$p2yarea1=0;
		$p2yarea2=0;
		$p2yarea3=0;
	}
	//BA区
	if ($p21=getFatherManbyFidAndTreeplace($p2['id'],1)){
		$p21NickName="<a href='?ID=".$p21['id']."'>"."<font color=black>".$p21['nickname']."</font>";
		$ul=ulevel($p21['ulevel']);
		$p21jibie=$ul['lvname'];
    //    $p21jibie=shengjiname($p21['ulevel2']);
		$p21rname=$p21['rname'];
		$p21ulevel=$p21['ulevel'];
		$p21usname=$p21['username'];
		$p21area1=$p21['area1'];
		$p21area2=$p21['area2'];
		$p21area3=$p21['area3'];
		$p21yarea1=$p21['yarea1'];
		$p21yarea2=$p21['yarea2'];
		$p21yarea3=$p21['yarea3'];
		if ($p21['ispay']==0){
			$p21ispaycolor=$nopay;	
		}else{
			$p21ispaycolor=$ispay;		
		}
	}else{
		if ($p2['id']==null){
			$p21NickName="注册";	
		}else{
			$p21NickName="<a href='register.php?nickname=".$p2['nickname']."&tid=1'><font color=black>注册</font></a>";	
		}	
		$p21jibie="空位";
		$p21area1=0;
		$p21area2=0;
		$p21area3=0;
		$p21yarea1=0;
		$p21yarea2=0;
		$p21yarea3=0;
	}
	//BB区
	if ($p22=getFatherManbyFidAndTreeplace($p2['id'],2)){
		$p22NickName="<a href='?ID=".$p22['id']."'>"."<font color=black>".$p22['nickname']."</font>";
		$ul=ulevel($p22['ulevel']);
		$p22jibie=$ul['lvname'];
    //    $p22jibie=shengjiname($p22['ulevel2']);
		$p22rname=$p22['rname'];
		$p22ulevel=$p22['ulevel'];
		$p22usname=$p22['username'];
		$p22area1=$p22['area1'];
		$p22area2=$p22['area2'];
		$p22area3=$p22['area3'];
		$p22yarea1=$p22['yarea1'];
		$p22yarea2=$p22['yarea2'];
		$p22yarea3=$p22['yarea3'];
		if ($p22['ispay']==0){
			$p22ispaycolor=$nopay;	
		}else{
			$p22ispaycolor=$ispay;		
		}
	}else{
		if ($p2['id']==null){
			$p22NickName="注册";	
		}else{
			$p22NickName="<a href='register.php?nickname=".$p2['nickname']."&tid=2'>注册</a>";	
		}	
		$p22jibie="空位";
		$p22area1=0;
		$p22area2=0;
		$p22area3=0;
		$p22yarea1=0;
		$p22yarea2=0;
		$p22yarea3=0;
	}
//BC区
if ($p23=getFatherManbyFidAndTreeplace($p2['id'],3)){
	$p23NickName="<a href='?ID=".$p23['id']."'>"."<font color=black>".$p23['nickname']."</font>";
	$ul=ulevel($p23['ulevel']);
	$p23jibie=$ul['lvname'];
	$p23rname=$p23['rname'];
//    $p23jibie=shengjiname($p23['ulevel2']);
	$p23ulevel=$p23['ulevel'];
	$p23usname=$p23['username'];
	$p23area1=$p23['area1'];
	$p23area2=$p23['area2'];
	$p23area3=$p23['area3'];
	$p23yarea1=$p23['yarea1'];
	$p23yarea2=$p23['yarea2'];
	$p23yarea3=$p23['yarea3'];
	if ($p23['ispay']==0){
		$p23ispaycolor=$nopay;
	}else{
		$p23ispaycolor=$ispay;
	}
}else{
	if ($p2['id']==null){
		$p23NickName="注册";
	}else{
		$p23NickName="<a href='register.php?nickname=".$p2['nickname']."&tid=3'>注册</a>";
	}
	$p23jibie="空位";
	$p23area1=0;
	$p23area2=0;
	$p23area3=0;
	$p23yarea1=0;
	$p23yarea2=0;
	$p23yarea3=0;
}


//C区
if ($p3=getFatherManbyFidAndTreeplace($ID,3)){
 /*   $cha=$p3['plevel']-$session['plevel'];
    if($cha>1){
        $p3NickName="<font color=black>".$p3['nickname']."</font>";
    }else{*/
        $p3NickName="<a href='?ID=".$p3['id']."'>"."<font color=black>".$p3['nickname']."</font>"."</a>";
 //   }

	$ul=ulevel($p3['ulevel']);
	$p3jibie=$ul['lvname'];
//    $p3jibie=shengjiname($p3['ulevel2']);
	$p3rname=$p3['rname'];
	$p3area1=$p3['area1'];
	$p3usname=$p3['username'];
	$p3ulevel=$p3['ulevel'];
	$p3area2=$p3['area2'];
	$p3area3=$p3['area3'];
	$p3yarea1=$p3['yarea1'];
	$p3yarea2=$p3['yarea2'];
	$p3yarea3=$p3['yarea3'];
	if ($p3['ispay']==0){
		$p3ispaycolor=$nopay;
	}else{
		$p3ispaycolor=$ispay;
	}
}else{
	$p3NickName="<a href='register.php?nickname=".$NickName."&tid=3'><font color=black>注册</font></a>";
	$p3jibie="空位";
	$p3area1=0;
	$p3area2=0;
	$p3area3=0;
	$p3yarea1=0;
	$p3yarea2=0;
	$p3yarea3=0;
}
//CA区
if ($p31=getFatherManbyFidAndTreeplace($p3['id'],1)){
	$p31NickName="<a href='?ID=".$p31['id']."'>"."<font color=black>".$p31['nickname']."</font>";
	$ul=ulevel($p31['ulevel']);
	$p31jibie=$ul['lvname'];
//    $p31jibie=shengjiname($p31['ulevel2']);
	$p31rname=$p31['rname'];
	$p31ulevel=$p31['ulevel'];
	$p31usname=$p31['username'];
	$p31area1=$p31['area1'];
	$p31area2=$p31['area2'];
	$p31area3=$p31['area3'];
	$p31yarea1=$p31['yarea1'];
	$p31yarea2=$p31['yarea2'];
	$p31yarea3=$p31['yarea3'];
	if ($p31['ispay']==0){
		$p31ispaycolor=$nopay;
	}else{
		$p31ispaycolor=$ispay;
	}
}else{
	if ($p2['id']==null){
		$p31NickName="注册";
	}else{
		$p31NickName="<a href='register.php?nickname=".$p3['nickname']."&tid=1'><font color=black>注册</font></a>";
	}
	$p31jibie="空位";
	$p31area1=0;
	$p31area2=0;
	$p31area3=0;
	$p31yarea1=0;
	$p31yarea2=0;
	$p31yarea3=0;
}
//CB区
if ($p32=getFatherManbyFidAndTreeplace($p3['id'],2)){
	$p32NickName="<a href='?ID=".$p32['id']."'>"."<font color=black>".$p32['nickname']."</font>";
	$ul=ulevel($p32['ulevel']);
	$p32jibie=$ul['lvname'];
//    $p32jibie=shengjiname($p32['ulevel2']);
	$p32rname=$p32['rname'];
	$p32ulevel=$p32['ulevel'];
	$p32usname=$p32['username'];
	$p32area1=$p32['area1'];
	$p32area2=$p32['area2'];
	$p32area3=$p32['area3'];
	$p32yarea1=$p32['yarea1'];
	$p32yarea2=$p32['yarea2'];
	$p32yarea3=$p32['yarea3'];
	if ($p32['ispay']==0){
		$p32ispaycolor=$nopay;
	}else{
		$p32ispaycolor=$ispay;
	}
}else{
	if ($p3['id']==null){
		$p32NickName="注册";
	}else{
		$p32NickName="<a href='register.php?nickname=".$p3['nickname']."&tid=2'>注册</a>";
	}
	$p32jibie="空位";
	$p32area1=0;
	$p32area2=0;
	$p32area3=0;
	$p32yarea1=0;
	$p32yarea2=0;
	$p32yarea3=0;
}
//CC区
if ($p33=getFatherManbyFidAndTreeplace($p3['id'],3)){
	$p33NickName="<a href='?ID=".$p33['id']."'>"."<font color=black>".$p33['nickname']."</font>";
	$ul=ulevel($p33['ulevel']);
	$p33jibie=$ul['lvname'];
//    $p33jibie=shengjiname($p33['ulevel2']);
	$p33rname=$p33['rname'];
	$p33ulevel=$p33['ulevel'];
	$p33usname=$p33['username'];
	$p33area1=$p33['area1'];
	$p33area2=$p33['area2'];
	$p33area3=$p33['area3'];
	$p33yarea1=$p33['yarea1'];
	$p33yarea2=$p33['yarea2'];
	$p33yarea3=$p33['yarea3'];
	if ($p33['ispay']==0){
		$p33ispaycolor=$nopay;
	}else{
		$p33ispaycolor=$ispay;
	}
}else{
	if ($p3['id']==null){
		$p33NickName="注册";
	}else{
		$p33NickName="<a href='register.php?nickname=".$p3['nickname']."&tid=3'>注册</a>";
	}
	$p33jibie="空位";
	$p33area1=0;
	$p33area2=0;
	$p33area3=0;
	$p33yarea1=0;
	$p33yarea2=0;
	$p33yarea3=0;
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/table.css" rel="stylesheet" type="text/css">
    <link href="css/style1.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="./he/jquery.ui.autocomplete.css">
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script src="./js/style.js" type="text/javascript" charset="utf-8"></script>
<title>个人资料</title>
<style type="text/css">
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}

</style>
</head>
<body>
<?php
$title="个人系统";
include_once("./public/header_nav.html");
?>
<table  width="100%" height="600" cellpadding="3" cellspacing="1" border="0" align="center" >
<form name="form1" method="post" action="?">
	<tr>
    <td height="22" colspan="3" class="ziti">查询会员：
      
        <input type="text" name="nickname" id="nickname">
      <input name="submin" type="submit" class="button_blue" id="submin" value="查  询"> 
     <?php
     	if ($ID != $_SESSION['ID']){
	 ?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="?ID=<?=$_SESSION['ID']?>">返回顶层</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:history.back(-1)">返回上一层</a>
     <?php
		}
	 ?>
     </td>
    <td style="background:<?=$ispay?>" align="center" class="ziti" >已激活</td>
    <td style="background:<?=$nopay?>" align="center" class="ziti">未激活</td>
    </tr>
	<tr>
  </form>
	  <td height="120" colspan="9" align="center">
	  <?php 
	  $se=null;
	  	if($uLevel==1){
			$se = '#79FF79';
		}else if($uLevel==2){
			$se = '#2894FF';
		}else if($uLevel==3){
			$se = '#FF5151';
		}else if($uLevel==4){
			$se = '#FFD700';
		}
	  ?>
	  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1" >
	    <tr>
	      <td style="background:<?=$usispaycolor?>" colspan="3" align="center"><font color="black"><?=$NickName ?></font></td>
        </tr>
          <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$usname?></td>
        </tr>
        <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$rname?></td>
        </tr>
	    <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$jibie?></td>
        </tr>
	    <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
        </tr>
	    <tr>
	      <td style="background-color: <?=$se?>" align="center"><?=$narea1?></td>
	      <td style="background-color: <?=$se?>" align="center"><?=$narea2?></td>
	      <td style="background-color: <?=$se?>" align="center"><?=$narea3?></td>
        </tr>
	   <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
        </tr>
	    <tr>
	      <td style="background-color: <?=$se?>" align="center"><?=$yarea1?></td>
	      <td style="background-color: <?=$se?>" align="center"><?=$yarea2?></td>
	      <td style="background-color: <?=$se?>" align="center"><?=$yarea3?></td>
        </tr>
      </table></td>
    </tr>
	<tr>
    <td height="36" colspan="9" align="center">
		<img src="images/t_tree_bottom_l.gif"  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="370" height="30">
		<img src="images/t_tree_top.gif"  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="370" height="30">
		<img src="images/t_tree_bottom_r.gif" height="30">
	</td>
  </tr>
  <tr>
	  <!--A-->
    <td width="50%" height="103" colspan="3"  align="center">
     <?php 
     $se=null;
	  	if($p1ulevel==1){
			$se = '#96FED1';
		}else if($p1ulevel==2){
			$se = '#4DFFFF';
		}else if($p1ulevel==3){
			$se = '#FF5151';
		}else if($p1ulevel==4){
			$se = '#FFD700';
		}
	  ?>
    <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
      <tr>
        <td style="background:<?=$p1ispaycolor?>; font-color:black;" colspan="3" align="center">
        <?= $p1NickName ?>
        </td>
      </tr>
      <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p1usname?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p1rname?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p1jibie?></td>
      </tr>
      <tr >
        <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" align="center"><?=$p1area1?></td>
        <td style="background-color: <?=$se?>" align="center"><?=$p1area2?></td>
        <td style="background-color: <?=$se?>" align="center"><?=$p1area3?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" align="center"><?=$p1yarea1?></td>
        <td style="background-color: <?=$se?>" align="center"><?=$p1yarea2?></td>
        <td style="background-color: <?=$se?>" align="center"><?=$p1yarea3?></td>
      </tr>
    </table></td>
	  <!--B-->
	  <td width="50%" colspan="3" align="center">
     <?php 
     $se=null;
	  	if($p2ulevel==1){
			$se = '#96FED1';
		}else if($p2ulevel==2){
			$se = '#4DFFFF';
		}else if($p2ulevel==3){
			$se = '#FF5151';
		}else if($p2ulevel==4){
			$se = '#FFD700';
		}
	  ?>
    <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
      <tr>
        <td style="background:<?=$p2ispaycolor?>" colspan="3" align="center"><?=$p2NickName?></td>
        </tr>
        <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p2usname?></td>
        </tr>
        <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p2rname?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p2jibie?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
        </tr>
      <tr >
        <td  style="background-color: <?=$se?>" align="center"><?=$p2area1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p2area2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p2area3?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
        </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p2yarea1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p2yarea2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p2yarea3?></td>
        </tr>
    </table></td>
	  <!--C-->
	  <td width="50%" colspan="3" align="center">
		  <?php
		  $se=null;
		  if($p3ulevel==1){
			  $se = '#96FED1';
		  }else if($p3ulevel==2){
			  $se = '#4DFFFF';
		  }else if($p3ulevel==3){
			  $se = '#FF5151';
		  }else if($p3ulevel==4){
			  $se = '#FFD700';
		  }
		  ?>
		  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
			  <tr>
				  <td style="background:<?=$p3ispaycolor?>" colspan="3" align="center"><?=$p3NickName?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p3usname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p3rname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p3jibie?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
			  </tr>
			  <tr >
				  <td  style="background-color: <?=$se?>" align="center"><?=$p3area1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p3area2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p3area3?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p3yarea1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p3yarea2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p3yarea3?></td>
			  </tr>
		  </table></td>
  </tr>
  <tr>
    <td height="36" colspan="3" align="center">
		<img src="images/t_tree_bottom_l.gif" alt=""  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="120" height="30">
		<img src="images/t_tree_top.gif" alt=""  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="120" height="30">
		<img src="images/t_tree_bottom_r.gif" alt="" height="30">
	</td>
    <td colspan="3" align="center">
		<img src="images/t_tree_bottom_l.gif" alt=""  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="120" height="30">
		<img src="images/t_tree_top.gif" alt=""  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="120" height="30">
		<img src="images/t_tree_bottom_r.gif" alt="" height="30">
	</td>
	  <td colspan="3" align="center">
		<img src="images/t_tree_bottom_l.gif" alt=""  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="120" height="30">
		<img src="images/t_tree_top.gif" alt=""  height="30">
		<img src="images/t_tree_line.gif" alt=""  width="120" height="30">
		<img src="images/t_tree_bottom_r.gif" alt="" height="30">
	</td>
  </tr>
  <tr>
	  <!--AA-->
    <td align="center" valign="top">
    <?php 
     $se=null;
	  	if($p11ulevel==1){
			$se = '#96FED1';
		}else if($p11ulevel==2){
			$se = '#4DFFFF';
		}else if($p11ulevel==3){
			$se = '#FF5151';
		}else if($p11ulevel==4){
			$se = '#FFD700';
		}
	  ?>
    <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
      <tr>
        <td style="background:<?=$p11ispaycolor?>" colspan="3" align="center"><?=$p11NickName?></td>
      </tr>
      <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p11usname?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p11rname?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>"  colspan="3" align="center"><?=$p11jibie?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
        </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p11area1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p11area2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p11area3?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
        </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p11yarea1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p11yarea2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p11yarea3?></td>
      </tr>
    </table></td>
	  <!--AB-->
    <td align="center" valign="top">
    <?php 
     $se=null;
	  	if($p12ulevel==1){
			$se = '#96FED1';
		}else if($p12ulevel==2){
			$se = '#4DFFFF';
		}else if($p12ulevel==3){
			$se = '#FF5151';
		}else if($p12ulevel==4){
			$se = '#FFD700';
		}
	  ?>
    <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
      <tr>
        <td style="background:<?=$p12ispaycolor?>" colspan="3" align="center"><?=$p12NickName?></td>
      </tr>
      <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p12usname?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p12rname?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>"  colspan="3" align="center"><?=$p12jibie?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
        </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p12area1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p12area2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p12area3?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
      </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p12yarea1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p12yarea2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p12yarea3?></td>
      </tr>
    </table></td>
	  <!--AC-->
	  <td align="center" valign="top">
		  <?php
		  $se=null;
		  if($p13ulevel==1){
			  $se = '#96FED1';
		  }else if($p13ulevel==2){
			  $se = '#4DFFFF';
		  }else if($p13ulevel==3){
			  $se = '#FF5151';
		  }else if($p13ulevel==4){
			  $se = '#FFD700';
		  }
		  ?>
		  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
			  <tr>
				  <td style="background:<?=$p13ispaycolor?>" colspan="3" align="center"><?=$p13NickName?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p13usname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p13rname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>"  colspan="3" align="center"><?=$p13jibie?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p13area1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p13area2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p13area3?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p13yarea1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p13yarea2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p13yarea3?></td>
			  </tr>
		  </table></td>
	  <!--BA-->
    <td align="center" valign="top">
    <?php 
     $se=null;
	  	if($p21ulevel==1){
			$se = '#96FED1';
		}else if($p21ulevel==2){
			$se = '#4DFFFF';
		}else if($p21ulevel==3){
			$se = '#FF5151';
		}else if($p21ulevel==4){
			$se = '#FFD700';
		}
	  ?>
    <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
      <tr>
        <td style="background:<?=$p21ispaycolor?>" colspan="3" align="center"><?=$p21NickName?></td>
      </tr>
      <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p21usname?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p21rname?></td>
      </tr>
      <tr>
        <td  style="background-color: <?=$se?>" colspan="3" align="center"><?=$p21jibie?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
      </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p21area1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p21area2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p21area3?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
        </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p21yarea1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p21yarea2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p21yarea3?></td>
      </tr>
    </table></td>
	  <!--BB-->
    <td  align="center" valign="top">
     <?php 
     $se=null;
	  	if($p22ulevel==1){
			$se = '#96FED1';
		}else if($p22ulevel==2){
			$se = '#4DFFFF';
		}else if($p22ulevel==3){
			$se = '#FF5151';
		}else if($p22ulevel==4){
			$se = '#FFD700';
		}
	  ?>
    <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
      <tr>
        <td style="background:<?=$p22ispaycolor?>" colspan="3" align="center"><?=$p22NickName?></td>
      </tr>
      <tr>
	      <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p22usname?></td>
        </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p22rname?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p22jibie?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
        </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p22area1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p22area2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p22area3?></td>
      </tr>
      <tr>
        <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
      </tr>
      <tr>
        <td  style="background-color: <?=$se?>" align="center"><?=$p22yarea1?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p22yarea2?></td>
        <td  style="background-color: <?=$se?>" align="center"><?=$p22yarea3?></td>
      </tr>
    </table></td>
	  <!--BC-->
	  <td align="center" valign="top">
		  <?php
		  $se=null;
		  if($p23ulevel==1){
			  $se = '#96FED1';
		  }else if($p23ulevel==2){
			  $se = '#4DFFFF';
		  }else if($p23ulevel==3){
			  $se = '#FF5151';
		  }else if($p23ulevel==4){
			  $se = '#FFD700';
		  }
		  ?>
		  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
			  <tr>
				  <td style="background:<?=$p23ispaycolor?>" colspan="3" align="center"><?=$p23NickName?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p23usname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p23rname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p23jibie?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p23area1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p23area2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p23area3?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p23yarea1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p23yarea2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p23yarea3?></td>
			  </tr>
		  </table></td>





	  <!--CA-->
	  <td align="center" valign="top">
		  <?php
		  $se=null;
		  if($p31ulevel==1){
			  $se = '#96FED1';
		  }else if($p31ulevel==2){
			  $se = '#4DFFFF';
		  }else if($p31ulevel==3){
			  $se = '#FF5151';
		  }else if($p31ulevel==4){
			  $se = '#FFD700';
		  }
		  ?>
		  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
			  <tr>
				  <td style="background:<?=$p31ispaycolor?>" colspan="3" align="center"><?=$p31NickName?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p31usname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p31rname?></td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" colspan="3" align="center"><?=$p31jibie?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p31area1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p31area2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p31area3?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p31yarea1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p31yarea2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p31yarea3?></td>
			  </tr>
		  </table></td>
	  <!--CB-->
	  <td  align="center" valign="top">
		  <?php
		  $se=null;
		  if($p32ulevel==1){
			  $se = '#96FED1';
		  }else if($p32ulevel==2){
			  $se = '#4DFFFF';
		  }else if($p32ulevel==3){
			  $se = '#FF5151';
		  }else if($p32ulevel==4){
			  $se = '#FFD700';
		  }
		  ?>
		  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
			  <tr>
				  <td style="background:<?=$p32ispaycolor?>" colspan="3" align="center"><?=$p32NickName?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p32usname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p32rname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p32jibie?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p32area1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p32area2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p32area3?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p32yarea1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p32yarea2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p32yarea3?></td>
			  </tr>
		  </table></td>
	  <!--CC-->
	  <td align="center" valign="top">
		  <?php
		  $se=null;
		  if($p33ulevel==1){
			  $se = '#96FED1';
		  }else if($p33ulevel==2){
			  $se = '#4DFFFF';
		  }else if($p33ulevel==3){
			  $se = '#FF5151';
		  }else if($p33ulevel==4){
			  $se = '#FFD700';
		  }
		  ?>
		  <table width="120" cellpadding="3" cellspacing="1" border="0" align="center" class="table1">
			  <tr>
				  <td style="background:<?=$p33ispaycolor?>" colspan="3" align="center"><?=$p33NickName?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p33usname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p33rname?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center"><?=$p33jibie?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >总计</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p33area1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p33area2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p33area3?></td>
			  </tr>
			  <tr>
				  <td style="background-color: <?=$se?>" colspan="3" align="center" >结余</td>
			  </tr>
			  <tr>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p33yarea1?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p33yarea2?></td>
				  <td  style="background-color: <?=$se?>" align="center"><?=$p33yarea3?></td>
			  </tr>
		  </table></td>
  </tr>
</table>
<?php include_once ("public/footer_nav.html")?>
</body>
</html>